﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using System.Windows.Forms;

namespace ZK.YCGLRD_TransManage
{
    public partial class TestIndex : Form
    {
        public TestIndex()
        {
            InitializeComponent();
        }

        private void Button1_Click(object sender, EventArgs e)
        {
            var resM = Com.WebApiService.ListWeighbridge(new Models.ListWeighbridgeSendM()
            {
                currentPage = 1,
                pageSize = 1,
                weighbridgeCode = Common.AppConfigHelper.GetAppSettings("WeighbridgeCode")
            });
            var a = resM.data[0];

        }

        private void Button2_Click(object sender, EventArgs e)
        {
            var a = Common.IConfig.GetSetCameraScalesQ;
        }

        private void Button3_Click(object sender, EventArgs e)
        {
            var resM = Com.WebApiService.UpdateHardWareByName("1", 2, "rererer");
        }

        System.Timers.Timer t = new System.Timers.Timer(5000); //设置时间间隔为5秒
        private void Button4_Click(object sender, EventArgs e)
        {
            t.Elapsed += new System.Timers.ElapsedEventHandler(Timer_TimesUp);
            t.AutoReset = false; //
            t.Enabled = true;
            t.Start();
        }

        private void Timer_TimesUp(object sender, ElapsedEventArgs e)
        {
           // throw new NotImplementedException();
        }

        private void Button5_Click(object sender, EventArgs e)
        {
            var a = t.Enabled;
        }

        private void Button6_Click(object sender, EventArgs e)
        {
            t.Start();
        }
    }
}
